<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1. reverse 反转数组
        let a=[1,2,3]
        console.log(a.reverse())
        // 2. sort 数组排序
        let b=[5,4,3]
        console.log(b.sort())
        // 3. join 数组转为字符串
        let c=[1,2,3]
        console.log(c.join())
        // 4. concat数组拼接
        let d=[5,6,7]
        console.log(d.concat(1,2,3))
        // 5. tostring 数组转为字符串
        let f=[1,2,3]
        console.log(f.toString())
        // 6. foreach(value,index) 遍历数组值
        let p=[1,2,3,4,5,6]
        p.forEach((value,index)=> {
            console.log(value)
            console.log(index)
        })
    </script>
</body>
</html>